One of the automatically generated functional test for an
authenticated controller fails on Rails 2.3, Ruby 1.9.1. The error
message looks like this:
1) Failure:
test_should_delete_token_on_logout(SessionsControllerTest)
[/Users/jeff/file/proj/guelph/src/test/functional/sessions_controller_test.rb:52]:
expected but was <[]>.
The test looks like this:
def test_should_delete_token_on_logout
login_as :quentin
get :destroy
assert_equal @response.cookies["auth_token"], []
end
It passes if assert_equal is replaced with assert_nil:
assert_nil @response.cookies["auth_token"]
I have no idea whether this is the right thing to do. The
relevant "cookies" method appears to be the one in
ActionController::Cookies#cookies, but there appear to be several
layers of indirection beyond that.